.image-card {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transform: translateZ(0);
    margin: 0 auto;
    /* 在虚拟列表中居中显示 */
}


/* 在虚拟列表中的卡片特殊样式 */

.virtual-list-card {
    cursor: pointer !important;
    position: relative !important;
    transform: none !important;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
}

.image-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

.image-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-gradient, linear-gradient(90deg, var(--color-primary, #1890ff), #36cfc9));
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
}

.image-card:hover::before {
    opacity: 1;
}

.image-card.dragging {
    opacity: 0.5;
}

.image-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    will-change: transform;
    transform: translateZ(0);
    display: block;
    transition: transform 0.3s ease;
}

.image-card:hover img {
    transform: scale(1.05);
}


/* 针对虚拟列表中的图片额外处理 */

.virtual-list-card img {
    height: 150px !important;
    object-fit: cover !important;
}

.image-card .title {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 10px;
    position: relative;
}

.title-buttons {
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.delete-button {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #000000;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    border: none;
    width: 28px;
    height: 28px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 5;
    opacity: 0;
    transform: translateY(-5px);
}

.image-card:hover .delete-button {
    opacity: 1;
    transform: translateY(0);
}

.delete-button:hover {
    color: #ff4d4f;
    background-color: white;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.exit-button {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #000000;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    border: none;
    width: 28px;
    height: 28px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 5;
    opacity: 0;
    transform: translateY(-5px);
}

.image-card:hover .exit-button {
    opacity: 1;
    transform: translateY(0);
}

.exit-button:hover {
    color: var(--color-primary, #1890ff);
    background-color: white;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.share-button {
    position: relative;
    background-color: var(--image-card-custom-color, var(--color-primary, #1890ff));
    color: white;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: translateY(5px);
    margin-left: 8px;
}

.image-card:hover .share-button {
    opacity: 0.8;
    transform: translateY(0);
}

.share-button:hover {
    opacity: 1;
    transform: scale(1.1);
    filter: brightness(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.share-button.shared {
    background-color: var(--success, #52c41a);
    opacity: 0.8;
    transform: translateY(0);
}

.share-button.shared:hover {
    filter: brightness(1.1);
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    opacity: 1;
}

.cancel-share-button {
    position: relative;
    background-color: var(--image-card-custom-color, var(--color-primary, #1890ff));
    color: white;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: translateY(5px);
    margin-left: 8px;
}

.image-card:hover .cancel-share-button {
    opacity: 0.8;
    transform: translateY(0);
}

.cancel-share-button:hover:not(:disabled) {
    opacity: 1;
    transform: scale(1.1);
    filter: brightness(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.cancel-share-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* 响应式布局 */

@media (max-width: 991px) {
    .image-card img {
        height: 140px;
    }
    .virtual-list-card img {
        height: 140px !important;
    }
    .image-card .title {
        font-size: 16px;
    }
}

@media (max-width: 767px) {
    .image-card img {
        height: 130px;
    }
    .virtual-list-card img {
        height: 130px !important;
    }
    .delete-button,
    .exit-button,
    .share-button,
    .cancel-share-button {
        width: 26px;
        height: 26px;
        opacity: 0.8;
        transform: none;
    }
}

@media (max-width: 575px) {
    .image-card img {
        height: 180px;
    }
    .virtual-list-card img {
        height: 180px !important;
    }
}